using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class sc_roomMap : EntityTypeConfiguration<sc_room>
    {
        public sc_roomMap()
        {
            // Primary Key
            this.HasKey(t => t.room);

            // Properties
            this.Property(t => t.time1)
                .IsFixedLength()
                .HasMaxLength(8)
                .IsRowVersion();

            this.Property(t => t.SCR_Name)
                .HasMaxLength(30);

            // Table & Column Mappings
            this.ToTable("sc_room");
            this.Property(t => t.room).HasColumnName("room");
            this.Property(t => t.day1).HasColumnName("day1");
            this.Property(t => t.day2).HasColumnName("day2");
            this.Property(t => t.day3).HasColumnName("day3");
            this.Property(t => t.day4).HasColumnName("day4");
            this.Property(t => t.day5).HasColumnName("day5");
            this.Property(t => t.day6).HasColumnName("day6");
            this.Property(t => t.day7).HasColumnName("day7");
            this.Property(t => t.doct).HasColumnName("doct");
            this.Property(t => t.time1).HasColumnName("time1");
            this.Property(t => t.type).HasColumnName("type");
            this.Property(t => t.SCR_Name).HasColumnName("SCR_Name");
        }
    }
}
